Add SSH agent set/get support - #355
Merged
Merged
Conversation
Collaborator
|
Thank you for the PR! |
meta-codesync Bot
pushed a commit
to facebook/sapling
that referenced
this pull request
Apr 24, 2026
Summary: Upgrade the ssh2 and libssh2-sys crates to a git rev of ssh2-rs that includes support for SSH agent socket get/set (rust-lang/ssh2-rs#355). Since the release containing this PR has not yet been cut, this uses [patch.crates-io] entries to redirect all ssh2 and libssh2-sys references to the git rev. This ensures that ssh2-async (which depends on ssh2 = "0.9") resolves to the same patched version, avoiding Cargo links conflicts on the libssh2 native library. The patch entries can be removed once upstream cuts a release. Reviewed By: dtolnay Differential Revision: D101730713 fbshipit-source-id: d1fe2df32af938bec40b67c9e890089168cc3bbf
meta-codesync Bot
pushed a commit
to facebookexperimental/rust-shed
that referenced
this pull request
Apr 24, 2026
Summary: Upgrade the ssh2 and libssh2-sys crates to a git rev of ssh2-rs that includes support for SSH agent socket get/set (rust-lang/ssh2-rs#355). Since the release containing this PR has not yet been cut, this uses [patch.crates-io] entries to redirect all ssh2 and libssh2-sys references to the git rev. This ensures that ssh2-async (which depends on ssh2 = "0.9") resolves to the same patched version, avoiding Cargo links conflicts on the libssh2 native library. The patch entries can be removed once upstream cuts a release. Reviewed By: dtolnay Differential Revision: D101730713 fbshipit-source-id: d1fe2df32af938bec40b67c9e890089168cc3bbf
meta-codesync Bot
pushed a commit
to facebookincubator/reindeer
that referenced
this pull request
Apr 24, 2026
Summary: Upgrade the ssh2 and libssh2-sys crates to a git rev of ssh2-rs that includes support for SSH agent socket get/set (rust-lang/ssh2-rs#355). Since the release containing this PR has not yet been cut, this uses [patch.crates-io] entries to redirect all ssh2 and libssh2-sys references to the git rev. This ensures that ssh2-async (which depends on ssh2 = "0.9") resolves to the same patched version, avoiding Cargo links conflicts on the libssh2 native library. The patch entries can be removed once upstream cuts a release. Reviewed By: dtolnay Differential Revision: D101730713 fbshipit-source-id: d1fe2df32af938bec40b67c9e890089168cc3bbf
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
libssh2 supports
libssh2_agent_set_identity_pathandlibssh2_agent_get_identity_path, but ssh2-rs currently does not expose these - in practice this means that theSSH_AUTH_SOCKenvironment variable is the only way to set this in Rust.This change exposes those in the libssh2-sys crate, and wires them up as
Agent::{set_identity_path, identity_path}. Since they handle paths, also reuses themkpathutil and moves it into the util module.